export default [
  /**
   * @name exact 表示是否严格匹配，即 location 是否和 path 完全对应上。
   * @name path 配置可以被 path-to-regexp@^1.7.0 理解的路径通配符。
   * @name component  配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径，
   * 也可以是相对路径，如果是相对路径，会从 src/pages 开始找起。
   */
  {
    path: '/admin',
    component: '@/layouts/basic_layout',
    routes: [
      // 栏目相关
      {
        path: '/admin/menu/add_menu',
        component: '@/pages/admin/menu/add_menu',
      },
      {
        path: '/admin/menu/menu_list',
        component: '@/pages/admin/menu/menu_list',
      },
      // 分类相关
      {
        path: '/admin/category/category_list',
        component: '@/pages/admin/category/category_list',
      },
      {
        path: '/admin/category/add_category',
        component: '@/pages/admin/category/add_category',
      },
      // 标签相关
      {
        path: '/admin/tag/tag_list',
        component: '@/pages/admin/tag/tag_list',
      },
      {
        path: '/admin/tag/add_tag',
        component: '@/pages/admin/tag/add_tag',
      },
      {
        path: '/admin/tag/update_tag',
        component: '@/pages/admin/tag/add_tag',
      },

      // 测试页面
      {
        path: '/admin/my_test/index',
        component: '@/pages/admin/my_test/index',
      },
      {
        path: '/admin/my_test/index2',
        component: '@/pages/admin/my_test/index2',
      },
      // 文章相关
      {
        path: '/admin/article/add_article',
        component: '@/pages/admin/article/add_article',
      },
      {
        path: '/admin/article/update_article',
        component: '@/pages/admin/article/add_article',
      },
      {
        path: '/admin/article/article_list',
        component: '@/pages/admin/article/article_list',
      },
      {
        path: '/admin/article/preview_article',
        component: '@/pages/admin/article/preview_article',
      },
      // 博客设置
      {
        path: '/admin/blog_setting/setting',
        component: '@/pages/admin/blog_setting/setting',
      },
      // 博主介绍
      {
        path: '/admin/blog_setting/blogger',
        component: '@/pages/admin/blog_setting/blogger',
      },
      // 友情链接
      {
        path: '/admin/share_url/add',
        component: '@/pages/admin/share_url/add',
      },
      {
        path: '/admin/share_url/update',
        component: '@/pages/admin/share_url/add',
      },
      {
        path: '/admin/share_url/list',
        component: '@/pages/admin/share_url/list',
      },
      // 广告
      {
        path: '/admin/ad/add',
        component: '@/pages/admin/ad/add',
      },
      {
        path: '/admin/ad/update',
        component: '@/pages/admin/ad/add',
      },
      {
        path: '/admin/ad/list',
        component: '@/pages/admin/ad/list',
      },
      // 留言
      {
        path: '/admin/message/article_list',
        component: '@/pages/admin/message/article_list',
      },
      {
        path: '/admin/message/blog_list',
        component: '@/pages/admin/message/blog_list',
      },
      {
        path: '/admin/message/answer_message',
        component: '@/pages/admin/message/answer_message',
      },
      // 统计
      {
        path: '/admin/blog_statistics/today',
        component: '@/pages/admin/blog_statistics/today',
      },
      {
        path: '/admin/blog_statistics/today_article_details',
        component: '@/pages/admin/blog_statistics/today_article_details',
      },
      {
        path: '/admin/blog_statistics/today_ad_details',
        component: '@/pages/admin/blog_statistics/today_ad_details',
      },
    ],
  },

  // 登录
  {
    path: '/login',
    component: '@/pages/admin/login/login',
  },

  // 博客
  {
    path: '/',
    component: '@/pages/blog/home/home',
    routes: [
      // 文章列表
      {
        path: '/blog/article/article_list',
        component: '@/pages/blog/article/article_list',
      },
      // 文章内容
      {
        path: '/blog/article/article_content',
        component: '@/pages/blog/article/article_content',
      },
      // 博客介绍
      {
        path: '/blog/user/blogger',
        component: '@/pages/blog/user/blogger',
      },
      // 博客留言
      {
        path: '/blog/blog_message/list',
        component: '@/pages/blog/blog_message/list',
      },
    ],
  },

  // 404
  { path: '*', component: '@/pages/404' },
];
